/*
基本类型：Number,String,Boolean,null undefined
复杂类型：Array,Object,Function
*/
// 对象
// const 变量名:{属性名:类型}=值
type objType = {
  username: string
  age: number
  list?: number[]
  fn: () => void
}

const obj: objType = {
  username: '张三',
  age: 18,
  list: [1, 2, 3],
  fn () {}
}

type obj2Type = {
  code: number
  message: string
  data: {
    list: {
      content: string
      score: number
      tags: string[]
      user: {
        nickname: string
        avatar: string
      }
      position: string
    }[]
  }
}
const obj2: obj2Type = {
  code: 200,
  message: 'success',
  data: {
    list: [
      {
        content: '四轮面试，效率很高，面试官都很温和，获益匪浅',
        score: 5,
        tags: ['面试官是大牛', '面试官很nice'],
        user: {
          nickname: '小白',
          avatar: '/uploads/avatar02_33ec1138bc.jpeg'
        },
        position: '中高级JAVA开发工程师'
      }
    ]
  }
}

export {}
